<template>
  <view>
    <view class="uni-padding-wrap home_tab_title">
      <uni-segmented-control
        :current="current"
        :values="items.map((v) => v.title)"
        @clickItem="onClickItem"
        style-type="text"
        active-color="#83C7B7"
      ></uni-segmented-control>
    </view>
    <view class="text-padding-wrap">
      <view class="iconfont icon-tiezishanchu"> </view>
    </view>
    <view class="word-padding-wrap">
      <view class="no">啊哦~这里什么都没有</view>
      <view class="want">快去邀请好友吧</view>
    </view>
    <view class="create">
      <button class="button" @tap="toInvite()">去邀请</button>
    </view>
  </view>
</template>

<script>
import { uniSegmentedControl } from "@dcloudio/uni-ui";
export default {
  components: {
    uniSegmentedControl,
  },
  data() {
    return {
      items: [{ title: "未到访客" }, { title: "已到访客" }],
      current: 0,
    };
  },
  methods: {
    onClickItem(e) {
      if (this.current !== e.currentIndex) {
        this.current = e.currentIndex;
      }
    },
    toInvite() {
      console.log(1);
      uni.navigateTo({
        url: "/pages/property/passing",
      });
    },
  },
};
</script>

<style>
.uni-padding-wrap {
  background-color: #ffffff;
  /* width:690rpx; */
}

.home_tab_title {
  padding: 0 15px;
  margin: 0 auto;
  font-size: 12px;
}
.text-padding-wrap {
  padding-top: 80px;
}
.icon-tiezishanchu {
  text-align: center;
}
.word-padding-wrap {
  padding-top: 10px;
  text-align: center;
}

.no {
  color: #5a5a5a;
  font-size: 14px;
}
.want {
  color: #929292;
  font-size: 12px;
}
.create {
  padding: 10px 120px;
}
.button {
  height: 30px;
  font-size: 14px;
  line-height: 30px;
  border-radius: 20px;
  background-color: #51c4d3;
  color: #fff;
}
</style>